﻿using BySoft.Server.Business;
using BySoft.Server.Common.Entity;
using BySoft.Web.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace BySoft.Web.Site.MasteData
{
    public partial class StockView : AuthBasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData();
            }
            Master.ValidationGroup = "gSubmit";
        }

        private void BindData()
        {
            string stockid = HttpUtility.UrlDecode(UIHelper.GetQueryStringValue("id").Trim());
            if (!string.IsNullOrEmpty(stockid))
            {
                MdStockEntity en = MdStock.GetMdStockByID(stockid);
                if (en != null)
                {
                    txtStockID.Text = en.StockID;
                    lblStockName.Text = en.StockName;
                }
            }
        }
    }
}